﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MpSoft.Library.BUSS.Contents;


namespace MpSoft.Web.Controls.Modules
{
    public partial class SliderControl : System.Web.UI.UserControl
    {
#region "Private Data"

#endregion

#region "Private Method"

        private void BindControl()
        {
            var list = AdvBUSS.Adv_List(1, 1);
            rptSlider.DataSource = list;
            rptSlider.DataBind();
        }

#endregion

#region "Event Handle"
        protected void Page_Load(object sender, EventArgs e)
        {
            BindControl();
        }

        protected void rptSlider_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            //var ltSlider = e.Item.FindControl("ltSlider") as Literal;
            //if (ltSlider != null)
            //{
            //    var obj = e.Item.DataItem as AdvDTO;
            //    ltSlider.Text = MpSoft.Library.CommonLibrary.HtmlString.S_Adv(obj.Image, obj.Link,
            //        obj.Height, obj.Width,
            //       obj.Target, obj.IsFlash,
            //       obj.Title + "  " + obj.Description, obj.Link);
            //}
        }

#endregion        

    }
}